package com.supcon.exchangedata.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.Map;

/**
 * @author ：icerain.gan
 * @date ：Created in 2020/3/11 23:08
 * @description：异常信息键值对获取
 * @modified By：
 * @version: 1.0$
 */
@ConfigurationProperties(prefix = "exception")
@Configuration
@Data
public class CodeMsg {

    private  Map<String,String> codeMessage;

    public  String getMsg(String code){
        return codeMessage.get(code);
    }

}
